package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qijian.maindata.domain.BomMaterialPreDetail;
import com.qijian.maindata.domain.query.BomMaterialPreDetailQuery;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 生产BOM用料预算明细Mapper接口
 *
 * @author qijian
 * @date 2022-05-17
 */
public interface BomMaterialPreDetailMapper extends BaseMapper<BomMaterialPreDetail> {

    @Select("select count(0) from main_bom_material_pre_detail WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    List<BomMaterialPreDetail> selectCostByProject(@Param(Constants.WRAPPER) QueryWrapper<BomMaterialPreDetailQuery> queryWrapper);
}
